//
//  SlideImageView.swift
//  myhub
//
//  Created by x on 2024/6/2.
//

//import UIKit
//import ImageSlideshow
//import XDesignKit
//
//open class SlideImageView: ImageSlideshow {
//    public override init(frame: CGRect) {
//        super.init(frame: frame)
//        makeUI()
//    }
//    public required init?(coder aDecoder: NSCoder) {
//        super.init(coder: aDecoder)
//        makeUI()
//    }
//    open func makeUI() {
//        contentScaleMode = .scaleAspectFit
//        contentMode = .scaleAspectFill
//        backgroundColor = UIColor.Material.grey100
//        borderWidth = Dimensions.borderWidth
//        borderColor = .white
//        slideshowInterval = 3
//        hero.modifiers = [.arc]
//        if #available(iOS 13, *) {
//            activityIndicator = DefaultActivityIndicator(style: UIActivityIndicatorView.Style.medium, color: UIColor.DesignKit.secondary())
//        } else {
//            activityIndicator = DefaultActivityIndicator(style: .white, color: UIColor.DesignKit.secondary())
//        }
//
//    }
//
//    open func setSources(sources: [URL]) {
//        setImageInputs(sources.map({ (url) -> KingfisherSource in
//            KingfisherSource(url: url)
//        }))
//    }
//
//    open func present(from controller: UIViewController) {
//        if #available(iOS 13, *) {
//            self.presentFullScreenControllerForIos13(from: controller)
//        } else {
//            self.presentFullScreenController(from: controller)
//        }
//    }
//}
//
//extension ImageSlideshow {
//    @discardableResult
//    open func presentFullScreenControllerForIos13(from controller: UIViewController) -> FullScreenSlideshowViewController {
//        let fullscreen = FullScreenSlideshowViewController()
//        fullscreen.pageSelected = {[weak self] (page: Int) in
//            self?.setCurrentPage(page, animated: false)
//        }
//        fullscreen.initialPage = currentPage
//        fullscreen.inputs = images
//        // slideshowTransitioningDelegate = ZoomAnimatedTransitioningDelegate(slideshowView: self, slideshowController: fullscreen)
//        fullscreen.transitioningDelegate = slideshowTransitioningDelegate
//        fullscreen.modalPresentationStyle = .fullScreen
//        controller.present(fullscreen, animated: true, completion: nil)
//
//        return fullscreen
//    }
//}
